{extend name='index@template/base'}{/extend}
{block name='style'}
<style>
    .title{text-align: center;padding: 10px;font-weight: bold;font-size: 18px}
</style>
{/block}
{block name='script'}{/block}
{block name='content'}
<div class="wrapper">
    <div class="panel panel-default" style="margin: 20px">
        <div class="panel-heading">
            设置公众号信息
        </div>
        <div class="panel-body">
            <form class="form-horizontal" id='form'  action="{:\\think\\Request::instance()->baseUrl()}">
                <div class="box-body">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">公众号名称</label>
                        <div class="col-sm-6">
                            <input type="text" class="form-control" placeholder="" name="name" value="{$data.name ?? ''}">
                        </div>
                        <div class="col-xs-3 col-ms-3"></div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">公众号账号</label>
                        <div class="col-sm-6">
                            <input type="text" class="form-control" placeholder="" name="account" value="{$data.account ?? ''}">
                        </div>
                        <div class="col-xs-3 col-ms-3"></div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">原始ID</label>
                        <div class="col-sm-6">
                            <input type="text" class="form-control" placeholder="" name="original" value="{$data.original ?? ''}">
                        </div>
                        <div class="col-xs-3 col-ms-3"></div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">AppId</label>
                        <div class="col-sm-6">
                            <input type="text" class="form-control" placeholder="" name="app_id" value="{$data.app_id ?? ''}">
                        </div>
                        <div class="col-xs-3 col-ms-3"></div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">AppSecret</label>
                        <div class="col-sm-6">
                            <input type="text" class="form-control" placeholder="" name="secret" value="{$data.secret ?? ''}">
                        </div>
                        <div class="col-xs-3 col-ms-3"></div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">接口地址</label>
                        <div class="col-sm-6">
                            <input type="text" class="form-control" placeholder="" name="url" value="{$data.url ?? ''}">
                        </div>
                        <div class="col-xs-3 col-ms-3"></div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">Token</label>
                        <div class="col-sm-6">
                            <input type="text" class="form-control" placeholder="" name="token" value="{$data.token ?? ''}">
                        </div>
                        <div class="col-xs-3 col-ms-3"></div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">EncodingAESKey</label>
                        <div class="col-sm-6">
                            <input type="text" class="form-control" placeholder="" name="EncodingAESKey" value="{$data.EncodingAESKey ?? ''}">
                        </div>
                        <div class="col-xs-3 col-ms-3"></div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-9 col-sm-offset-3">
                            <button type="submit" class="btn btn-primary radius">&nbsp;&nbsp;提交&nbsp;&nbsp;</button>
                            <button type="button" class="btn btn-default radius ml-20" onclick="layer_close();">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>


</div>
{/block}
{block name='script_extra'}
<script>
    $("#form").Validform({
        tiptype:2,
        showAllError:true,
        ajaxPost: true,
        callback: function (res) {
            if (res.success == true){
                layer.msg(res.message, {time: 1000},function () {
                    layer_close();
                });
            }
        }
    });
</script>
{/block}